|
|
|
|
|
|
|
Active Server Pages are a special kind of Web page hosted on Microsoft's Internet Information Server. Even though they have the extension .ASP, they are really just text files that contain HTML. What makes them special is their ability to mix in two types of codecode that will run on the server and code that will run on the client (interpreted by the Web browser). To read the trade press, you would think that ASP is a huge advance in programming and that Web sites should immediately convert entirely from plain, static HTML pages to ASP. |
|
|
|
|
|
|
|
|
Now, I won't try to tell you that ASP isn't powerful. It is. Microsoft uses it extensively on their site. Their commerce server package is little more than a wizard that creates ASP pages for you. But from a computer science point of view, it seems to me to be a huge step backward. Why? Because although ASP pages can and do use objects, the code is not particularly object-oriented. Actually, a complex ASP page almost approaches the unreadability of an APL program. (APL being a language of such elegance that it is said that any program can be written in a single line of code. APL also requires a special keyboard to handle all of the new characters required for its commands.) Server-and client-side code are mixed indiscriminately, and you can spend half your time trying to figure out where your code will actually run. Worse yet, the code is all VBScript or JavaScript and is thus slow and interpreted. |
|
|
|
|
|
|
|
|
Now, if that isn't a step pastward, I don't know what is. |
|
|
|
|
|
|
|
|
Of course, this is coming from a person who considers HTML a step backward as well. Think about itafter spending years developing sophisticated and powerful text formats such as RTF, the whole world took a massive step back to a format that was so primitive that we've spent the past few years waiting for new tags and editors to let us do what a good word processor could handle easily. Worse yet, we still can't get pages to look the same under different browsers. |
|
|
|
|
|
|
|
|
The point is that ASP, although powerful, is slow, complex, and difficult to support. |
|
|
|
|
|
|
|
|
The good news is that ASP pages let you easily call dynamic link libraries that can do everything an ASP script can do and then some. These DLLs can be written in any language, including Visual Basic. They run in-process, so they are fast. And they make it easy to distinguish between server-side code (which is the code that makes up the DLL) and client-side code (which is any code that you write out as part of the HTML text generated by the DLL). |
|
|
|
|
|
|
|
|
Personally, every ASP page I've ever written has done nothing but load an ActiveX object from a DLL and invoke methods on the object. There are some quirks, however, in the way ASP handles these DLLs that can make debugging complicated in some cases. |
|
|
|
|
|